<template>
  <div id="login"></div>
</template>
<script>
import { requestSignin, checkUserDuplicate, getIdent } from "../../api/api";
import * as coreJS from "../../utils/core";
export default {
  name: "signin",
  beforeCreate() {
    if (process.env.NODE_ENV === "development") {
      console.log("创建前：");
      console.log(this.$route.query);
    }

    var result = this.$route.query;
    // console.log(result)
    if (result["msg"] == "exist") {
      getIdent({ ident: result.ident }).then(res => {
        this.$store.commit("set_token", {
          token: res.token,
          UUID: res.UUID,
          user: result["user"]
        });
        //console.log(res);
        this.$router.push("/");
      });
    }
  },
  data() {
    return {};
  }
};
</script>
